<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: MacToPhyControlInfo Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00133.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<div class="title">MacToPhyControlInfo Class Reference<div class="ingroups"><a class="el" href="a00510.html">phyLayer - physical layer modules</a> &#124; <a class="el" href="a00509.html">macLayer - MAC layer modules</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="MacToPhyControlInfo" -->
<p>Stores information which is needed by the physical layer when sending a MacPkt.  
 <a href="a00133.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00294_source.html">MacToPhyControlInfo.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for MacToPhyControlInfo:</div>
<div class="dyncontent">
<div class="center"><img src="a00843.png" border="0" usemap="#MacToPhyControlInfo_inherit__map" alt="Inheritance graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for MacToPhyControlInfo:</div>
<div class="dyncontent">
<div class="center"><img src="a00844.png" border="0" usemap="#MacToPhyControlInfo_coll__map" alt="Collaboration graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a00845.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00133.html#acde623038e9b9a2b756e48cb5b393d8a">MacToPhyControlInfo</a> (<a class="el" href="a00192.html">Signal</a> *<a class="el" href="a00133.html#a05a564d743e50aa370ee796ee932c8a6">signal</a>=NULL)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the <a class="el" href="a00133.html" title="Stores information which is needed by the physical layer when sending a MacPkt.">MacToPhyControlInfo</a> with the passed signal or null if signal is ommited.  <a href="#acde623038e9b9a2b756e48cb5b393d8a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad4a56f10fab531b0076aadb0904175b6"></a><!-- doxytag: member="MacToPhyControlInfo::~MacToPhyControlInfo" ref="ad4a56f10fab531b0076aadb0904175b6" args="()" -->
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00133.html#ad4a56f10fab531b0076aadb0904175b6">~MacToPhyControlInfo</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete the signal if it is still in our ownership. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00133.html#a37b1b75e5bc8026af8d3de5bb3b318ab">setSignal</a> (<a class="el" href="a00192.html">Signal</a> *s)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the signal of this <a class="el" href="a00133.html" title="Stores information which is needed by the physical layer when sending a MacPkt.">MacToPhyControlInfo</a>.  <a href="#a37b1b75e5bc8026af8d3de5bb3b318ab"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00192.html">Signal</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00133.html#a5e04d8d4088109ccccb7c3fcdae526a7">retrieveSignal</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a pointer to the <a class="el" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a> of this ControlInfo.  <a href="#a5e04d8d4088109ccccb7c3fcdae526a7"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static cObject *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00133.html#a5b1c091d57ea342922940df4d66491df">setControlInfo</a> (cMessage *const pMsg, <a class="el" href="a00192.html">Signal</a> *const pSignal)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Attaches a "control info" structure (object) to the message pMsg.  <a href="#a5b1c091d57ea342922940df4d66491df"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a77773ff7342a9bd5932f7e8764e7b222"></a><!-- doxytag: member="MacToPhyControlInfo::getSignal" ref="a77773ff7342a9bd5932f7e8764e7b222" args="(cMessage *const pMsg)" -->
static <a class="el" href="a00192.html">Signal</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00133.html#a77773ff7342a9bd5932f7e8764e7b222">getSignal</a> (cMessage *const pMsg)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">extracts the signal from message "control info". <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c74f62a53ff9b71ba39192f02b28cf7"></a><!-- doxytag: member="MacToPhyControlInfo::getSignalFromControlInfo" ref="a5c74f62a53ff9b71ba39192f02b28cf7" args="(cObject *const pCtrlInfo)" -->
static <a class="el" href="a00192.html">Signal</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00133.html#a5c74f62a53ff9b71ba39192f02b28cf7">getSignalFromControlInfo</a> (cObject *const pCtrlInfo)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">extracts the signal from "control info". <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a54180de46bca6176817d2872b9aa6c26"></a><!-- doxytag: member="MacToPhyControlInfo::MacToPhyControlInfo" ref="a54180de46bca6176817d2872b9aa6c26" args="(const MacToPhyControlInfo &amp;o)" -->
&#160;</td><td class="memItemRight" valign="bottom"><b>MacToPhyControlInfo</b> (const <a class="el" href="a00133.html">MacToPhyControlInfo</a> &amp;o)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1407d34f41332ffe67f0de0a1398606f"></a><!-- doxytag: member="MacToPhyControlInfo::operator=" ref="a1407d34f41332ffe67f0de0a1398606f" args="(const MacToPhyControlInfo &amp;o)" -->
<a class="el" href="a00133.html">MacToPhyControlInfo</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="a00133.html">MacToPhyControlInfo</a> &amp;o)</td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a05a564d743e50aa370ee796ee932c8a6"></a><!-- doxytag: member="MacToPhyControlInfo::signal" ref="a05a564d743e50aa370ee796ee932c8a6" args="" -->
<a class="el" href="a00192.html">Signal</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00133.html#a05a564d743e50aa370ee796ee932c8a6">signal</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A pointer to the signal representing the transmission. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Stores information which is needed by the physical layer when sending a MacPkt. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="acde623038e9b9a2b756e48cb5b393d8a"></a><!-- doxytag: member="MacToPhyControlInfo::MacToPhyControlInfo" ref="acde623038e9b9a2b756e48cb5b393d8a" args="(Signal *signal=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">MacToPhyControlInfo::MacToPhyControlInfo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00192.html">Signal</a> *&#160;</td>
          <td class="paramname"><em>signal</em> = <code>NULL</code></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initialize the <a class="el" href="a00133.html" title="Stores information which is needed by the physical layer when sending a MacPkt.">MacToPhyControlInfo</a> with the passed signal or null if signal is ommited. </p>
<p>NOTE: Once a signal is passed to the <a class="el" href="a00133.html" title="Stores information which is needed by the physical layer when sending a MacPkt.">MacToPhyControlInfo</a>, <a class="el" href="a00133.html" title="Stores information which is needed by the physical layer when sending a MacPkt.">MacToPhyControlInfo</a> takes the ownership of the <a class="el" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a>. </p>
<div class="fragment"><pre class="fragment">    : cObject()
    , <a class="code" href="a00133.html#a05a564d743e50aa370ee796ee932c8a6" title="A pointer to the signal representing the transmission.">signal</a>(signal)
  {}
</pre></div>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a5e04d8d4088109ccccb7c3fcdae526a7"></a><!-- doxytag: member="MacToPhyControlInfo::retrieveSignal" ref="a5e04d8d4088109ccccb7c3fcdae526a7" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00192.html">Signal</a>* MacToPhyControlInfo::retrieveSignal </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns a pointer to the <a class="el" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a> of this ControlInfo. </p>
<p>NOTE: The ownership of the <a class="el" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a> is passed together with the <a class="el" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a> itself. This means the caller of this method is responsible for deletion of the <a class="el" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a>. <a class="el" href="a00133.html" title="Stores information which is needed by the physical layer when sending a MacPkt.">MacToPhyControlInfo</a> also loses its pointer to the <a class="el" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a> when this Method is called so following calls of this method will return null! </p>

<p>Referenced by <a class="el" href="a00135.html#aa989c47bc332dfd13d2af6ba6f2e9555">MacToUWBIRPhyControlInfo::getSignalFromControlInfo()</a>, and <a class="el" href="a00133.html#a5c74f62a53ff9b71ba39192f02b28cf7">getSignalFromControlInfo()</a>.</p>
<div class="fragment"><pre class="fragment">                           {
    <a class="code" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a>* tmp = <a class="code" href="a00133.html#a05a564d743e50aa370ee796ee932c8a6" title="A pointer to the signal representing the transmission.">signal</a>;
    <a class="code" href="a00133.html#a05a564d743e50aa370ee796ee932c8a6" title="A pointer to the signal representing the transmission.">signal</a> = NULL;
    <span class="keywordflow">return</span> tmp;
  }
</pre></div>
</div>
</div>
<a class="anchor" id="a5b1c091d57ea342922940df4d66491df"></a><!-- doxytag: member="MacToPhyControlInfo::setControlInfo" ref="a5b1c091d57ea342922940df4d66491df" args="(cMessage *const pMsg, Signal *const pSignal)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static cObject* MacToPhyControlInfo::setControlInfo </td>
          <td>(</td>
          <td class="paramtype">cMessage *const&#160;</td>
          <td class="paramname"><em>pMsg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00192.html">Signal</a> *const&#160;</td>
          <td class="paramname"><em>pSignal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Attaches a "control info" structure (object) to the message pMsg. </p>
<p>This is most useful when passing packets between protocol layers of a protocol stack, the control info will contain the signal.</p>
<p>The "control info" object will be deleted when the message is deleted. Only one "control info" structure can be attached (the second setL3ToL2ControlInfo() call throws an error).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">pMsg</td><td>The message where the "control info" shall be attached. </td></tr>
    <tr><td class="paramname">pSignal</td><td>The signal which should be send. </td></tr>
  </table>
  </dd>
</dl>

<p>Referenced by <a class="el" href="a00196.html#aa39c30004cbd08a2a0b0405d818313b0">SimpleMacLayer::createMacPkt()</a>, and <a class="el" href="a00026.html#ab57af129814d784f2a96978f036c575a">BaseMacLayer::setDownControlInfo()</a>.</p>
<div class="fragment"><pre class="fragment">        {
            <a class="code" href="a00133.html" title="Stores information which is needed by the physical layer when sending a MacPkt.">MacToPhyControlInfo</a> * <span class="keyword">const</span> cCtrlInfo = <span class="keyword">new</span> <a class="code" href="a00133.html" title="Stores information which is needed by the physical layer when sending a MacPkt.">MacToPhyControlInfo</a>(pSignal);
            pMsg-&gt;setControlInfo(cCtrlInfo);

            <span class="keywordflow">return</span> cCtrlInfo;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a37b1b75e5bc8026af8d3de5bb3b318ab"></a><!-- doxytag: member="MacToPhyControlInfo::setSignal" ref="a37b1b75e5bc8026af8d3de5bb3b318ab" args="(Signal *s)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void MacToPhyControlInfo::setSignal </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00192.html">Signal</a> *&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the signal of this <a class="el" href="a00133.html" title="Stores information which is needed by the physical layer when sending a MacPkt.">MacToPhyControlInfo</a>. </p>
<p>NOTE: Once a signal is passed to the <a class="el" href="a00133.html" title="Stores information which is needed by the physical layer when sending a MacPkt.">MacToPhyControlInfo</a>, <a class="el" href="a00133.html" title="Stores information which is needed by the physical layer when sending a MacPkt.">MacToPhyControlInfo</a> takes the ownership of the <a class="el" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a>. </p>
<div class="fragment"><pre class="fragment">                            {
    <span class="keywordflow">if</span>(<a class="code" href="a00133.html#a05a564d743e50aa370ee796ee932c8a6" title="A pointer to the signal representing the transmission.">signal</a>)
      <span class="keyword">delete</span> <a class="code" href="a00133.html#a05a564d743e50aa370ee796ee932c8a6" title="A pointer to the signal representing the transmission.">signal</a>;

    <a class="code" href="a00133.html#a05a564d743e50aa370ee796ee932c8a6" title="A pointer to the signal representing the transmission.">signal</a> = s;
  }
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/phyLayer/<a class="el" href="a00294_source.html">MacToPhyControlInfo.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00133.html">MacToPhyControlInfo</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:32 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
